import pytest
from base.logger import logger
import os

if __name__ == '__main__':
    logger.info("开始执行UI自动化测试用例".center(50, "*"))
    pytest.main()
    logger.info("生成html测试报告".center(50, "*"))
    os.system(r'allure generate ./report/jsonreport -o ./report/htmlreport --clean')
    logger.info(
        "若html测试报告未生成，请手动执行命令：allure generate ./report/jsonreport -o ./report/htmlreport --clean")
    logger.info("UI自动化测试用例执行完成".center(50, "*"))